import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutation'
import actions from './action'
import getters from './getter'

Vue.use(Vuex)

const state = {
  username: localStorage.getItem('userInfo') || {}, // 用户名
  logined: JSON.parse(localStorage.getItem('userInfo')) || false, // 是否登录状态
  token: '',
  pdfModel: false,
  headimageurl: ''
}

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters
})

